/// 单例管理
class HomeManager {
  // 开始动画的top位置
  double startTop = 150;

  factory HomeManager() => _getInstance();
  static HomeManager get instance => _getInstance();
  // 静态变量_instance，存储唯一对象
  static HomeManager? _instance;
  // 获取唯一对象
  static HomeManager _getInstance() {
    _instance ??= HomeManager._init();
    return _instance!;
  }

  // 初始化方法
  HomeManager._init() {
    startTop = 150;
  }
}
